package com.jvm.memory;

/**
 * 多栈导致OOM
 *
 * @author Lizhong
 * @date 2019/2/20
 */
public class StackOOM {
    private static void doStop() {
        while (true) {
        }
    }

    public static void start() {
        while (true) {
            new Thread(StackOOM::doStop).start();
        }
    }

    public static void main(String[] args) {
        start();
    }
}


